<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./style.css" />
    <title>03_滚动转换效果</title>
  </head>
  <body>
    <section>
      <span class="curve">
        <img src="../assets/images/curve.png" alt="" />
      </span>
    </section>
    <script>
      let scroll = document.querySelector('.curve')
      window.addEventListener('scroll', function () {
        let value = window.scrollY / -500 + 1
        scroll.style.transform = `scaleY(${value})`
      })
    </script>
  </body>
</html>
